<template>
    <div class="swiperDiv">
        <swiper :options="swiperOption" ref="mySwiper">
            <!-- slides -->
            <swiper-slide class="swiperItem" v-for="item of swiperlist" :key="item.key">
                <img class="swiperImg" :src="item.imgUrl" />
            </swiper-slide>
            <!-- Optional controls -->
            <div class="swiper-pagination"  slot="pagination"></div>
        </swiper>
    </div>
</template>
<script>
export default {
    name:"HomeSwiper",
    data (){
        return{
            swiperOption:{
                pagination: '.swiper-pagination',
                loop:true
            },
            swiperlist:[{
                id:"0001",
                imgUrl:"http://img1.qunarzz.com/piao/fusion/1801/1a/94428c6dea109402.jpg_640x200_2cf590d8.jpg"
            },{
                id:"0002",
                imgUrl:"http://img1.qunarzz.com/piao/fusion/1802/42/7c92b9a381e46402.jpg_640x200_1cdce2a4.jpg"
            }]
        }
    }
}
</script>
<style lang="stylus" scoped>
    .swiperDiv >>> .swiper-pagination-bullet-active 
        background: #fff
    .swiperDiv
        width:100%
        overflow: hidden
        height :0
        padding-bottom : 31.25%
        background-color : #ccc
    .swiperItem
        width:100%
    .swiperImg
        width:100%
</style>